$(document).ready(function() {
	
    $(".bnt_frm").click(function(){
        var contents = $("#contents").val();
        var user_mobile =$("#mobile").val();
        if (user_mobile =="") {
          jAlert("请填写手机号","发送失败","");
          return false;
        }else if(contents ==""){
          jAlert("请填写短信内容","发送失败","");
          return false;
        }
        var data = {mobile:user_mobile,contents:contents};
        $.ajax({
            url: "index.php?go=softpos.api.sendSms",
            type: 'post',
            dataType: 'json',
            data:data,
            success: function(response) {
                if (response.success == "success") {
                    jAlert("发送成功","发送成功",function(r) {
                        if (r==true) {
                           location.reload(); 
                        }
                    });
                } else {
                    jAlert(response.data,"发送失败","");
                }
            }
        });
    });
    
});